From: Jan Gerber Date: Tue, 2 Aug 2011 11:01:01 +0000 (+0000) Subject: use tabs. for consistant whitespaces X-Git-Tag: 1.31.0-rc.0~28496 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=5acb37d00e84b191ae02943493ff4a0c97e2af89;p=lhc%2Fweb%2Fwiklou.git use tabs. for consistant whitespaces --- diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index a891b2dedf..4769f92a91 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -91,9 +91,9 @@ class ApiUpload extends ApiBase { if( $this->mParams['filesize'] > $maxSize ) { $this->dieUsage( 'The file you submitted was too large', 'file-too-large' ); } - } else { + } else { $this->verifyUpload(); - } + } // Check if the user has the rights to modify or overwrite the requested title @@ -122,25 +122,25 @@ class ApiUpload extends ApiBase { $result['warnings']['stashfailed'] = $e->getMessage(); } } elseif ( $this->mParams['chunk'] ) { - $result['result'] = 'Continue'; + $result['result'] = 'Continue'; $chunk = $request->getFileTempName( 'chunk' ); $chunkSize = $request->getFileSize( 'chunk' ); - if ($this->mParams['offset'] == 0) { + if ($this->mParams['offset'] == 0) { $result['filekey'] = $this->performStash(); - } else { - $status = $this->mUpload->appendChunk($chunk, $chunkSize, - $this->mParams['offset']); - if ( !$status->isGood() ) { - $this->dieUsage( $status->getWikiText(), 'stashfailed' ); - } else { - $result['filekey'] = $this->mParams['filekey']; - if($this->mParams['offset'] + $chunkSize == $this->mParams['filesize']) { - $this->mUpload->finalizeFile(); - $result['result'] = 'Done'; - } - } - } - $result['offset'] = $this->mParams['offset'] + $chunkSize; + } else { + $status = $this->mUpload->appendChunk($chunk, $chunkSize, + $this->mParams['offset']); + if ( !$status->isGood() ) { + $this->dieUsage( $status->getWikiText(), 'stashfailed' ); + } else { + $result['filekey'] = $this->mParams['filekey']; + if($this->mParams['offset'] + $chunkSize == $this->mParams['filesize']) { + $this->mUpload->finalizeFile(); + $result['result'] = 'Done'; + } + } + } + $result['offset'] = $this->mParams['offset'] + $chunkSize; } elseif ( $this->mParams['stash'] ) { // Some uploads can request they be stashed, so as not to publish them immediately. // In this case, a failure to stash ought to be fatal